package com.it.mongo.config;

import com.mongodb.MongoClient;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.gridfs.GridFSBucket;
import com.mongodb.client.gridfs.GridFSBuckets;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.gridfs.GridFsTemplate;

/**
 * 拓展：可以定义一个抽象类为父类，子类继承这个抽象类，以实现一个项目多个mongo配置，具体参考tmxmall
 */

@Configuration
public class MongoConfig {

    //    @Bean
//    public MongoTemplate getMongoTemplate() throws Exception {
//        return new MongoTemplate(new MongoClient());
//    }
}